package com.midian.model.common.vo.report;

import java.io.Serializable;

import com.midian.common.utils.NumberHelper;
/**
 * 
 * @Title:统计报表
 * @Desription:图形报表绑定对象
 * @Company:CSN
 * @ClassName:ReportVo.java
 * @Author:zhucong
 * @CreateDate:2013-11-5 下午02:20:53  
 * @UpdateUser:zhucong 
 * @Version:0.1
 */
public class ReportVo implements Serializable{

	private static final long serialVersionUID = 8787476131692224789L;
	/**描述名称*/
	private String name;
	/**数量*/
	private Number count;
	
	public ReportVo(){
		
	}
	public ReportVo(String name){
		this.name = name;
	}
	public ReportVo(String name, Number count){
		this.name = name;
		this.count = count;
	}
	public ReportVo(String latestEqpCdFm, String companyName, Number count){
		this.name = latestEqpCdFm +"-"+ companyName;
		this.count = count;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setCount(Number count) {
		this.count = count;
	}
	
	/**
	 * 获取浮点数值(两位数四舍五入)
	 * @return
	 */
	public Double getDoubleCount() {
		Double result = null;
		if(this.count != null) {
			result = NumberHelper.opDefValBy(2, this.count.doubleValue());
		}
		return result;
	}
	
	/**
	 * 获取浮点数值
	 * @return
	 */
	public Double getRealDoubleCount() {
		Double result = null;
		if(this.count != null) {
			result = this.count.doubleValue();
		}
		return result;
	}
	
	/**
	 * 获取整形数值
	 * @return
	 */
	public Integer getIntegerCount() {
		Integer result = null;
		if(this.count != null) {
			result = this.count.intValue();
		}
		return result;
	}
	
	/**
	 * 获取整形数值，如果为空则返回0
	 * @return
	 */
	public Integer getIntegerCount2() {
		if(this.count != null) {
			return this.count.intValue();
		}
		return 0;
	}
}
